<script type="text/javascript">
	function del_all(){
		ui_confirm('确定要删除全部消息吗?',function(){
			sendAjax("{:U('del','type=all')}",'', function(data) {
				if (data.status) {
					ui_alert(data.info,function(){
						location.reload();
					});
				}
			});
		});
	}

	function del_dialogue($reply_id){
		ui_confirm('确定要删除吗?',function(){
			sendAjax("{:U('del','type=dialogue')}",'reply_id='+$reply_id, function(data) {
				if (data.status){
					ui_alert(data.info,function(){
						location.reload();
					});
				}
			});
		});
	}

	function add() {
		window.open("{:U('add')}", "_self");
	}

	function move_to(val) {
		var vars = $("#form_data").serialize();
		sendAjax("{:U('mark','action=move_folder')}", "val=" + val + "&" + vars);
		location.reload();
	}

	$(document).ready(function() {
		set_return_url();
		$("#move_to li").click(function() {
			move_to($(this).attr("id"));
		});
	}); 
</script>